package com.guaoran.jpa.repository;

import com.guaoran.jpa.entity.VpgMovie;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

/**
 * @author : 孤傲然
 * @Description :
 * @date :2018/1/23 21:38
 */
public interface VpgMovieRepository extends JpaRepository<VpgMovie,Long> {
    /**
     * 根据关键字查询影片
     * @param title
     * @param actors
     * @param director
     * @param pageable
     * @return
     */
    public Page<VpgMovie> findDistinctByTitleContainingOrActorsContainingOrDirectorContaining(String title, String actors, String director, Pageable pageable);

    /**
     * 通过包id查询影片
     * @param packageId
     * @return
     */
    public List<VpgMovie> queryByPackageId(Long packageId);

}


